import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

public class Main {

	public static void main(String[] args) {

		User user = new User();
		user.setName("Karol");
		user.setSurname("Czarnecki");

		Car car = new Car();
		car.setBrand("Volksvagen");
		car.setModel("Passat");

		Validator<User> userValidator = new Validator<>();
		Validator<Car> carValidator = new Validator<>();

		boolean userValitdatorResult = userValidator.validate(user);

		if (!userValitdatorResult) {
			System.out.println("User is incorrect.");
		}

		boolean carValitdatorResult = carValidator.validate(car);
		if (!carValitdatorResult) {
			System.out.println("Car is incorrect.");
		}

		if (userValitdatorResult && carValitdatorResult) {
			System.out.println("All data correct");
		}
	}

}
